package com.black.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.black.system.domain.SysConfig;
import com.black.system.domain.req.sysconfig.SysConfigAddReq;
import com.black.system.domain.req.sysconfig.SysConfigEditReq;
import com.black.system.domain.req.sysconfig.SysConfigQueryReq;
import com.black.system.domain.resp.sysconfig.SysConfigResp;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @author L
 * @description 针对表【sys_config(参数配置表)】的数据库操作Service
 * @createDate 2024-08-19 10:07:23
 */
public interface SysConfigService extends IService<SysConfig> {
    /**
     * 根据key获取配置值
     *
     * @param configKey 配置key
     * @return
     */
    String getConfigValueByKey(String configKey);

    /**
     * 分页查询
     *
     * @param req
     * @return
     */
    PageInfo<SysConfigResp> paginationQuery(SysConfigQueryReq req);

    /**
     * 添加
     *
     * @param req
     * @return
     */
    boolean add(SysConfigAddReq req);

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    SysConfigResp findById(Long id);

    boolean edit(SysConfigEditReq req);

    /**
     * 根据id删除
     *
     * @param ids
     * @return
     */
    boolean deleteById(Long[] ids);

    /**
     * 导出
     *
     * @param req
     * @param ids
     * @return
     */
    List<SysConfigResp> export(SysConfigQueryReq req, Long[] ids);
}
